#ifndef DATASUBSCRIBE_H
#define DATASUBSCRIBE_H

//#include "BaseModule.h"
#include <QtCore/QThread>
#include "DataConsumer.h"
#include "Define.h"
#include <QDateTime>

class SharedData;

class DataSubscribe : public QObject//, public BaseModule
{
public:
    DataSubscribe();
    ~DataSubscribe();
    virtual void Setup(ModuleInfo& mi);

    virtual std::string getTypeList();

    virtual void regConsumer(DataConsumer* dc) ;

    //void OnData(QString, QString, QVariant);
// private:
//     virtual void setLoader(QLibrary*);
private:
    QLibrary* library = nullptr;
    DataConsumer* dataConsumer = nullptr;
    std::string dataName;
    ModuleInfo mi;
    SharedData* shares;

};

#endif // DATASUBSCRIBE_H
